﻿<%--
 *  File:    OrgEdit.jsp
 *  @Author: Langerwang 
 *  Date:    2010/12/10
 *  @Modifier: Jamesli 
 *  Date:    2010/06/28
 *
 *  Copyright (C) 2000 - 2010 Oval Technologies, Inc.
 *  All rights reserved. 
 *
 *  This software is the confidential and proprietary information of Oval 
 *  Technologies, Inc. ("Confidential Information").  You shall not
 *  disclose such Confidential Information and shall use it only in
 *  accordance with the terms of the license agreement you entered into
 *  with Oval.
--%>


<%@ include file="/inc/SessionTimeout.inc"%>
<%@ page language="java" %>     
<%@ page import="java.util.*" %>
<%@ page import="org.apache.log4j.Category" %>

<%@ page contentType = "text/html;charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/PageFlow.tld" prefix="PageFlow" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/oval-tag.tld" prefix="oval" %>
<%@ taglib uri="/WEB-INF/custom.tld" prefix="custom" %>

<%
  //init param
  Category cat = Category.getInstance("jsp.OrgEdit");
  String strPrivCode=(String)request.getParameter("third");  
  if( strPrivCode==null)
    strPrivCode=(String)session.getAttribute("third");
  if(strPrivCode==null)
    strPrivCode="";
  String privilegeCode = "10101,10901";
  String strModuleName = "OGM"; 
  String contextPath = request.getContextPath();
%>
<%!
        private static Object getFromVector(Vector vec, String columnname, String key) {
        Object ret = null;
        if (vec != null) {
            for (int i = 0; i < vec.size(); i++) {
                HashMap hash = (HashMap) vec.elementAt(i);
                if (hash == null) break;
                if (columnname.equals(hash.get("mdcolumnname"))) {
                    ret = hash.get(key);
                }
            }
        }
        return ret;
    }
%>



<%
  String dateFormat = (String)session.getAttribute("dateformat");
  	if(dateFormat==null)
  		dateFormat = "yyyy-MM-dd";
  //get curuserinfo
  HashMap CurUserInfo = (HashMap)session.getAttribute("userinfo");
  String strCurOrgName = (String)CurUserInfo.get("orgname");
  Integer nCurOrgId = (Integer)CurUserInfo.get("orgid");
  
  if(nCurOrgId == null)
    nCurOrgId = new Integer(-1234567);
  HashMap centerOrgInfo = session.getAttribute("centerorginfo")==null?(new HashMap()):(HashMap)session.getAttribute("centerorginfo");
  Integer nCenterOrgId = (Integer)centerOrgInfo.get("orgid");
  boolean bIsCenterOrg = false;
  
  if(  nCenterOrgId != null 
    && nCenterOrgId.toString().equals(nCurOrgId.toString()))
    bIsCenterOrg = true;

  //get org info
  String strParentOrgId = (String)request.getParameter("parentorgid");
  if(strParentOrgId == null)
    strParentOrgId = "";
  String strIsNewChild = (String)request.getParameter("newchild");
  if(strIsNewChild == null)
    strIsNewChild = "";
	
  String strOrgId = (String)request.getParameter("orgid");
  String strParentOrgName = "";
  String strReadOnly = new String("");
  boolean bIsEditOrg = false;
  boolean bIsNewChild = false;
  boolean bIsNew = false;
  //if(strIsNewChild.equalsIgnoreCase("N"))
  if(strOrgId != null )
  {
    strReadOnly = "ReadOnly";
    bIsEditOrg = true;
  }
  //if(strIsNewChild.equalsIgnoreCase("Y"))
  if(strOrgId == null )
  bIsNewChild = true;
  bIsNew = !bIsEditOrg && !bIsNewChild;
  cat.debug("is new :" + bIsNew);	
  cat.debug("is new child :" + bIsNewChild);	
  cat.debug("is edit:" + bIsEditOrg);	
%>
<%@ include file="/inc/Security.inc" %>
<%@ include file="/inc/PageDefault.inc" %>

<html>
<head>
<title></title>
 <script language="JavaScript" src="<%=contextPath %>/js/Calendar.js"></script>
 <script language="JavaScript" src="<%=contextPath %>/js/ScriptLib.js"></script>
<PageFlow:CheckPageFlow pageName="orgedit"/>
<%@ include file="/inc/InitEdit.inc" %>
<%
  HashMap orgInfo = (HashMap)pageContext.getAttribute("orginfo");

  if(orgInfo == null)
    orgInfo = new HashMap();
  
  Integer ishead = (Integer)orgInfo.get("ischain");
  if(ishead==null)
	  ishead = new Integer(-1);
  
  String openDate = OvalTools.dateToString(orgInfo.get("opendate"), dateFormat);
     
  cat.debug("The orgInfo is :" + orgInfo);
  if(bIsNewChild)
  {
    strParentOrgName = (String)orgInfo.get("orgname");
    pageContext.removeAttribute("orginfo");
    orgInfo.clear();
    openDate = "";
  }else if(bIsEditOrg){
    strParentOrgName = (String)orgInfo.get("parentorgname");
  }
  
  
  Vector allpccodeSelectTemp = (Vector)pageContext.getAttribute("allpccode");
  if(allpccodeSelectTemp == null)
    allpccodeSelectTemp = new Vector();
  cat.debug("The allpccodeSelect is :" + allpccodeSelectTemp);
  Vector allpccodeSelect = new Vector();
  
  cat.debug("now orginfo is:" + orgInfo);
  if(bIsEditOrg)
  {
    for(int w = 0;w < allpccodeSelectTemp.size();w++)
    {
      HashMap tempHM = (HashMap)allpccodeSelectTemp.elementAt(w);   
      cat.debug("now pccode value is:" + (Integer)tempHM.get("value"));
      if(tempHM.get("value") != null && ((Integer)tempHM.get("value")).equals((Integer)orgInfo.get("globalpccode")))
      {
        allpccodeSelect.add(tempHM);
        break;
      }
    }
  }else{
    for(int w = 0;w < allpccodeSelectTemp.size();w++)
    {
      HashMap tempHM = (HashMap)allpccodeSelectTemp.elementAt(w);   
      if(tempHM.get("value") != null && !((Integer)tempHM.get("value")).equals(new Integer(99)))
      {
        allpccodeSelect.add(tempHM);
      }
    }
  }
  
  pageContext.setAttribute("allpccode",allpccodeSelect);
  cat.debug("The allpccodeSelect is :" + allpccodeSelect);
  Vector allcountrySelect = (Vector)pageContext.getAttribute("allcountry");
  if(allcountrySelect == null)
    allcountrySelect = new Vector();
  cat.debug("The allcountrySelect is :" + allcountrySelect);
  Vector allbusinessareaSelect = (Vector)pageContext.getAttribute("allbusinessarea");
  if(allbusinessareaSelect == null)
    allbusinessareaSelect = new Vector();
  cat.debug("The allbusinessareaSelect is :" + allbusinessareaSelect);
  Vector allcurrencySelect = (Vector)pageContext.getAttribute("allcurrency");
  if(allcurrencySelect == null)
    allcurrencySelect = new Vector();
  cat.debug("The allcurrencySelect is :" + allcurrencySelect);
  Vector alllanguageSelect = (Vector)pageContext.getAttribute("alllanguage");
  if(alllanguageSelect == null)
    alllanguageSelect = new Vector();
  cat.debug("The alllanguageSelect is :" + alllanguageSelect);
  Vector allpaytermSelect = (Vector)pageContext.getAttribute("allpayterm");
  if(allpaytermSelect == null)
    allpaytermSelect = new Vector();
  cat.debug("The allpaytermSelect is :" + allpaytermSelect);
  Vector allshiptermSelect = (Vector)pageContext.getAttribute("allshipterm");
  if(allshiptermSelect == null)
    allshiptermSelect = new Vector();
  cat.debug("The allshiptermSelect is :" + allshiptermSelect);
  Vector allpaymethodSelect = (Vector)pageContext.getAttribute("allpaymethod");
  if(allpaymethodSelect == null)
    allpaymethodSelect = new Vector();
  cat.debug("The allpaymethodSelect is :" + allpaymethodSelect);
  Vector allshipmethodSelect = (Vector)pageContext.getAttribute("allshipmethod");
  if(allshipmethodSelect == null)
    allshipmethodSelect = new Vector();
  cat.debug("The allshipmethodSelect is :" + allshipmethodSelect);
  Vector allstatusSelect = (Vector)pageContext.getAttribute("allstatus");
  if(allstatusSelect == null)
    allstatusSelect = new Vector();
  cat.debug("The allstatusSelect is :" + allstatusSelect);
  Vector allcorptypeSelect = (Vector)pageContext.getAttribute("allcorptype");
  if(allcorptypeSelect == null)
    allcorptypeSelect = new Vector();
  cat.debug("The allcorptypeSelect is :" + allcorptypeSelect);
%>

<%
              Vector    vecMdConfig = (Vector) pageContext.getAttribute("mdconfig");
              HashMap curOrgHash =  (HashMap)pageContext.getAttribute("orginfo");
              if (curOrgHash == null){
                curOrgHash = new HashMap();
              }
              Integer entity = (Integer) curOrgHash.get("orgid");
              if (entity == null)      entity=new Integer(-1);

                  HashMap hashSalesChannel=new HashMap();
                   hashSalesChannel.put("languagecode",session.getAttribute("languagecode"));
                   hashSalesChannel.put("entityid",entity);
                   Integer  intSalesChannel=(Integer)getFromVector(vecMdConfig,"saleschannelid","mdconfigid");
                  String   strSalesChannelQlName = (String)getFromVector(vecMdConfig,"saleschannelid","qlname");
                  if(strSalesChannelQlName==null)    strSalesChannelQlName = "default" ;
                  Integer  intSalesChannelValueSource=(Integer)getFromVector(vecMdConfig,"saleschannelid","valuesource");
                  String  strSalesChannelColName=(String)getFromVector(vecMdConfig,"saleschannelid","mdcolumnname");
                  String  strSalesChannelDateManageFlag=(String)getFromVector(vecMdConfig,"saleschannelid","datemanageflag");



                  HashMap hashRegion = new HashMap();
                  hashRegion.put("languagecode",session.getAttribute("languagecode"));
                  hashRegion.put("entityid",entity);
                  Integer  intRegion=(Integer)getFromVector(vecMdConfig,"regioncode","mdconfigid");
                  String  strRegionQlName=(String)getFromVector(vecMdConfig,"regioncode","qlname");
                  if(strRegionQlName==null)    strRegionQlName = "default" ;
                  Integer  intRegionValueSource=(Integer)getFromVector(vecMdConfig,"regioncode","valuesource");
                  String  strRegionColName=(String)getFromVector(vecMdConfig,"regioncode","mdcolumnname");
                  String  strRegionDateManageFlag=(String)getFromVector(vecMdConfig,"regioncode","datemanageflag");

                  HashMap hashCity = new HashMap();
                  hashCity.put("languagecode",session.getAttribute("languagecode"));
                  hashCity.put("entityid",entity);
                  Integer  intCity=(Integer)getFromVector(vecMdConfig,"citycode","mdconfigid");
                  String  strCityQlName=(String)getFromVector(vecMdConfig,"citycode","qlname");
                  if(strCityQlName==null)    strCityQlName = "default" ;
                  Integer  intCityValueSource=(Integer)getFromVector(vecMdConfig,"citycode","valuesource");
                  String  strCityColName=(String)getFromVector(vecMdConfig,"citycode","mdcolumnname");
                  String  strCityDateManageFlag=(String)getFromVector(vecMdConfig,"citycode","datemanageflag");

                 HashMap hash=new HashMap();
                 hash.put(intSalesChannel,hashSalesChannel) ;
                 hash.put(intRegion,hashRegion) ;
                 hash.put(intCity,hashCity) ;
                 session.setAttribute("criteria",hash);
				 String isEdit="";
				 if(request.getParameter("orgid")!=null)
				 {
				  isEdit="edit";
				 }

   %>
   
<%
String strDisplayFlag="";
if(request.getParameter("displayflag")!=null)
{
  strDisplayFlag=request.getParameter("displayflag");
}
%>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="<%=contextPath %>/css/<%= strLanguageCode %>/main.css" type="text/css">
<script language="JavaScript" src="<%=contextPath %>/js/FuncLib.js"></script>
<%@ include file="/inc/NewCalendar.inc" %>
<script language="JavaScript">
var needcheckuser = false;
var needcheckaddress = false;

function defaultReceiver()
{
  if(isEmpty(document.frm.content0.value))
  {
    document.frm.content0.value = document.frm.orgname.value;
    document.frm.content1.value = document.frm.orgname.value;
    changeAddress();
  }
  return; 
}
function page_setOrg(id,name)
{
  document.frm.relatedorgid.value = id;
<%if(!bIsEditOrg){%>
  <%--[SCRIPT]  document.frm.ownerorgid.value = id;   2/9/2003 1:27PM KentZhong  [SCRIPT]--%>
<%}%>
  document.frm.sourceorgid.value = id;  
  document.frm.relatedorgname.value = name;
  var remote = window.open("","newwindow");
  if (remote != null)
    remote.close();
}


function checkOrgInfo(form)
{
  if(!isNumberic(form.registerfund.value))
  {
    alert("<%= message.getMessageDesc("VALUE_MUST_BE_NUMBER", label.getLabelName("L_RegisterFund",false)) %>");
    return false;
  }
  
  return true;
}

function page_save(){
  if(!isheadnull())return;
  if(!checkForm(document.frm))return;
  var zipcode=document.frm.zipcode.value;
  if(zipcode!=""&&zipcode!=" "){
    if(Trim(zipcode).length!=6){
      alert("请输入六位数字的邮编");
      document.frm.zipcode.focus();
  	  return;
    }
    document.frm.zipcode.value = Trim(zipcode);
  }
  obj1 = document.frm.salespercent;
  obj2 = document.frm.transferpercent;
  obj3 = document.frm.distributepercent;
  number1 = Number(obj1.value.substring(0,obj1.value.length-1));
  number2 = Number(obj2.value.substring(0,obj2.value.length-1));
  number3 = Number(obj3.value.substring(0,obj3.value.length-1));
  if(number1!="" || number2!="" || number3!=""){
   	if((number1+number2+number3)!=100){
      alert("纯销、调拨和分销比例之和应为100%！");
      obj.focus();
      return;
    }
  }
    
  document.frm.target="_self";
  var orgid = document.frm.orgid1.value;
  if(orgid==null || orgid==""){
	document.frm.actionname.value="done";
  }else{
    document.frm.actionname.value="mydone";
  }
  <%if(!(isEdit).equals("edit")){%>					
    setTimeout("__clickedTab(document.getElementById('attributeTab'),'/oval/zyl/masterdata/erm/ZylMasterdataRelationship.jsp?globalpccode=112');","1500");
  <%} %>
  
  if(frm.shortname.value=="")
  	frm.shortname.value = frm.orgname.value;
  emptyToNull(document.frm);
  __submitData('orgeditfrm',true);
}

var popwindow;
function page_selectProvince()
{
var countrycode = frm.countrycode.options[frm.countrycode.selectedIndex].value;
	//alert(countrycode);
  // var countrycode1 = frm.orgcountrycode.value;
  //alert(countrycode1);
  if(countrycode=="" || countrycode==-1)
  {
    alert("<%= message.getMessageDesc("MUST_SELECT_FIRST",label.getLabelName("L_CountryName"))%>");
    <%--[SCRIPT]  frm.orgcountrycode.focus();  [SCRIPT]--%>
    return;
  }
  if(popwindow!=null)
    popwindow.close();
  popwindow = window.open('RegionSelect.jsp?<%= OvalTools.randomURL() %>&languagecode=<%= strLanguageCode %>&countrycode=' + countrycode,'newwindow', 'height=250, width=500,top=100,left=100,toolbar=n0, menubar=no, scrollbars=no, resizable=no, location=no, status=no');
}
function page_setRegion(code,name)
{
  if(code != document.frm.regioncode.value)
  {
    document.frm.citycode.value = "";
    document.frm.cityname.value = "";
	document.frm.countycode.value = "";
    document.frm.countyname.value = "";
  }
  document.frm.regioncode.value = code;
  document.frm.regionname.value = name;
  if (popwindow != null)
    popwindow.close();
}
function page_selectCity(flag,grade)
{
  var regioncode = document.frm.regioncode.value;
  var parentcitycode = document.frm.citycode.value;
  if(flag=="city")parentcitycode='null';
  if(regioncode=="" || regioncode==-1){
    alert("<%= message.getMessageDesc("MUST_SELECT_FIRST",label.getLabelName("L_Province"))%>");
    return;
  }
  if(parentcitycode=="" || parentcitycode==-1){
    alert("<%= message.getMessageDesc("MUST_SELECT_FIRST",label.getLabelName("L_City"))%>");
    return;
  }
  var url='<%=contextPath %>/masterdata/ogm/CitySelect.jsp?<%= OvalTools.randomURL() %>&languagecode=<%= strLanguageCode %>&countrycode=CN&regioncode=' + regioncode + '&flag=' + flag+'&grade='+grade;
  if(flag=="county"){
   url=url+'&parentcitycode='+parentcitycode;
  }
  if(popwindow!=null)
    popwindow.close();
  popwindow = window.open(url,'newwindow', 'height=250, width=400,top=100,left=100,toolbar=n0, menubar=no, scrollbars=yes, resizable=no, location=no, status=no');
}

function page_setCity(code,name,id,flag)
{
	if(flag == "county"){
		document.frm.countycode.value = code;
		document.frm.countyname.value = name;
	}else {
		document.frm.citycode.value = code;
		document.frm.cityname.value = name;
		document.frm.countycode.value = "";
    	document.frm.countyname.value = "";
	}
  if (popwindow != null)
    popwindow.close();
}

function changeattr1()
{
  for(var i=0; i<document.frm.saleschannelid.options.length; i++)
  {
    if(document.frm.saleschannelid.options[i].text == document.frm.saleschannelid.value)
      document.frm.saleschannelid.options[i].selected = true;
  }
}

function page_setOrg(id,name,code)
{
  document.frm.parentorgid.value = id;
  document.frm.parentorgcode.value = code;  
  document.frm.parentorgname.value = name;
  var remote = window.open("","newwindow");
  if (remote != null)
    remote.close();
}

function setBusinessarea(id,areaname){
	document.frm.businessareaid.value=id;
	document.frm.areaname.value=areaname;
	
}

function popBusinessarea(){
	if(popwindow!=null) popwindow.close();
    url = '<%=contextPath %>/zyl/masterdata/erm/BusinessAreaPop.jsp?<%= OvalTools.randomURL() %>';
    attribute = 'height=500, width=250,top=100,left=100,toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no';
	popwindow = window.open(url,'newwindow', attribute);
}
	
function page_back(){
	parent.location.href="OrgSummary.jsp?<%= OvalTools.randomURL() %>&summaryidentify=distributor&languagecode=<%=strLanguageCode%>&IsExternal="+top.isExternal;
}

function page_showExtendInfo(){
	document.getElementById("extendinfo").style.display="block";
	document.getElementById("showbutton").style.display="none";
	document.getElementById("hiddenbutton").style.display="block";
}

function page_hiddenExtendInfo(){
	document.getElementById("showbutton").style.display="block";
	document.getElementById("extendinfo").style.display="none";
	document.getElementById("hiddenbutton").style.display="none";
}

function page_ck(obj) 
{
	if(obj.value!=""){
		if (obj.value.substr(obj.value.length-1)!= '%' || isNaN(Number(obj.value.substring(0,obj.value.length-1)))) 
		{
			alert( '请输入百分数 ！');
			obj.value = "";
			obj.focus();
		}
	}
}

function page_doSum(obj) 
{
	
		if (!isNaN(Number(obj.value))) 
		{
			var num1 = Number(document.frm.bizcoverhospital.value);
			var num2 = Number(document.frm.bizcoverpharmacy.value);
			var num3 = Number(document.frm.bizcoverthirdterminal.value);
			var num4 = Number(document.frm.bizcovercorp.value);
			sum = num1+num2+num3+num4;
			page_setSum(sum);
		}else{
			alert("请输入正确的数值！");
			obj.focus();
		}
	
}

function page_setSum(sum){
	document.frm.bizcovertotal.value = sum;
}

function page_checkNullStr(obj){
	var str=obj.value;
	str = ( str || "" ).replace(/^\s+|\s+$/g, "");
	str = ( str || "" ).replace(/^\　+|\　+$/g, "");
	obj.value=str;
}


function checkDtlevel1(){
    if(frm.dtlevel1.value == 4){
    document.getElementById("dtlevel1tempid").style.color="red";
    }
 }
 
function getorgpdgroup()
{
	if (document.frm.orgid==null||(document.frm.orgid.value==null)||(document.frm.orgid.value.length <= 0)||(document.frm.orgid.value=="null")){
    	alert("<%=message.getMessageDesc("SAVE_INFO_FIRST")%>");
        return;
    }
    if(popwindow!=null)
    popwindow.close();
    popwindow = window.open('ZylOrgpdGroup.jsp?<%= OvalTools.randomURL() %>&languagecode=<%= strLanguageCode %>&datacategory=10&displayflag=<%= strDisplayFlag%>&orgid='+document.frm.orgid.value,null, 'height=300, width=500,top=100,left=100,toolbar=n0, menubar=no, scrollbars=yes, resizable=no, location=no, status=no');

}

function getorgpdgroup1()
{
	if (document.frm.orgid==null||(document.frm.orgid.value==null)||(document.frm.orgid.value.length <= 0)||(document.frm.orgid.value=="null")){
    	alert("<%=message.getMessageDesc("SAVE_INFO_FIRST")%>");
        return;
    }
    if(popwindow!=null)
    popwindow.close();
    popwindow = window.open('ZylOrgpdGroup.jsp?<%= OvalTools.randomURL() %>&languagecode=<%= strLanguageCode %>&datacategory=16&displayflag=<%= strDisplayFlag%>&orgid='+document.frm.orgid.value,null, 'height=300, width=500,top=100,left=100,toolbar=n0, menubar=no, scrollbars=yes, resizable=no, location=no, status=no');

}

function ishead(ele){
	document.getElementById("ishead1").style.display = (ele=="1")?"block":"none";
	document.getElementById("ishead2").style.display = (ele=="1")?"block":"none";
	document.getElementById("headParent").style.color = (ele=="1")?"red":"black";
    document.frm.parentorgcode.command = (ele=="1")?"notnull":"";
	if(ele!=1){
		frm.orgproperty.value = " ";
		frm.manager.value = "";
		frm.franchiseno.value = "";
		frm.totalpharmacy.value = "";
	}
}

function isheadnull(){
	var head = frm.ischain.value;
	if(head == "1"){
		if(frm.orgproperty.value==" "){
			alert("<%= message.getMessageDesc("VALUE_NOT_NULL", label.getLabelName("L_Attribute")) %>");
			frm.orgproperty.focus();
			return false;
		}
		/*if(frm.manager.value==""){
			alert("<%= message.getMessageDesc("VALUE_NOT_NULL", label.getLabelName("L_Responsibility")) %>");
			frm.manager.focus();
			return false;
		}*/
	}
	return true;
}

function init(){
	if(<%=(ishead.intValue()==1)%>){
		ishead(1);
	}
}

function page_setOrg4(id,name,code)
{
  document.frm.countyorgid.value = id;
  document.frm.countyorgcode.value = code;  
  document.frm.countyorgname.value = name;
  var remote = window.open("","newwindow");
  if (remote != null)
    remote.close();
}
</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="init();">
<table width="100%" cellspacing="0" cellpadding="0">
  <tr>
    <td class="summary_top"></td>
  </tr>
</table>
	<table width="100%" cellspacing="0" cellpadding="0" >
	<form id="orgeditfrm" name="frm" method="post" action="<%=contextPath %>/Dispatcher">
       <input type="hidden" name="pagename" value="orgedit">
       <input type="hidden" name="actionname">
       <input type="hidden" name="jspname"  value="OrgEdit.jsp">
<%--       <input type="hidden" name="fromURL"> --%>
       <%
         if(bIsEditOrg){        
       %>
       <input type="hidden" name="orgid" value="<%=JspHelper.filterNull( orgInfo.get("orgid") )%>">    
       <input type="hidden" name="grade" value="<%=JspHelper.filterNull( orgInfo.get("grade") )%>">  
	   <input type="hidden" name="infoid" value="<%=JspHelper.filterNull( orgInfo.get("infoid") )%>">  
       <%
         }
         if(bIsNewChild){
       %>
       <input type="hidden" name="grade" value="<%=JspHelper.filterNull( 1 )%>">                          
       <input type="hidden" name="isbottom" value="<%=JspHelper.filterNull( new String("Y") )%>">  
       <input type="hidden" name="solutiontype" value="<%=JspHelper.filterNull( new String("0") )%>"> 
       <input type="hidden" name="isneworg" value="Y"> 
       <%
         }
         if(bIsNew){
       %>
       <input type="hidden" name="isneworg" value="Y">
       <input type="hidden" name="grade" value="<%=JspHelper.filterNull( 1 )%>">   
       <input type="hidden" name="isbottom" value="<%=JspHelper.filterNull( new String("Y") )%>">                      
       <%}if(bIsNew){%>
       <input type="hidden" name="solutiontype" value="<%=JspHelper.filterNull( new String("0") )%>"> 
       <%}%>
       
       <input type="hidden" name="isprimary" value="<%=JspHelper.filterNull( new String("Y") )%>"> 
       <input type="hidden" name="addressroletype" value="<%=JspHelper.filterNull( new Integer(1) )%>"> 
       <input type="hidden" name="addressname" value="<%= label.getLabelName("L_OfficeAddress",false)  %>"> 

       <input type="hidden" name="datelastupdated" value="<%=JspHelper.filterNull( new java.sql.Date(new java.util.Date().getTime()) )%>">                                     
       <input type="hidden" name="numrows" value="<%=JspHelper.filterNull( new Integer(6) )%>"> 

       <input type="hidden" name="newchild" value="<%=JspHelper.filterNull( bIsNewChild )%>"> 
       <input type="hidden" name="editorg" value="<%=JspHelper.filterNull( bIsEditOrg )%>">   
       <input type="hidden" name="neworg" value="<%=JspHelper.filterNull( bIsNew )%>"> 
       <input type="hidden" name="orgid1" value="<%=JspHelper.filterNull( orgInfo.get("orgid") )%>"> 
       <input type="hidden" name="addresstype" value="o"> 

  <tr> 
    <td valign="top"> 
        <table border="1" cellspacing="0" bordercolorlight="#999999" bordercolordark="#FFFFFF" align="center" width="100%" cellpadding="1">
          <%if(!(strDisplayFlag).equals("view")){%>
		  <tr>
			 <td colspan="4" class="td_right"><custom:button
			  type="2" label="L_Save" imgsrc="save_btn.gif" border="0" onclick="page_save()" /></td>
		  </tr>
		  <%}%>
              <%
                boolean isAuto = pageContext.getAttribute("isauto") != null && pageContext.getAttribute("isauto").toString().equalsIgnoreCase("Y");
                String codeClass = isAuto?"td-text":"need";
                String codeIsNull = isAuto?"Y":"N";
                String codeISDisabled = isAuto?"true":"false";
              %>
          <tr>
            <td class="td-text" width="15%" ><%= label.getLabelName("L_OrganizationCode") + label.getLabelName("L_Colon") %></td>
            <td width="35%"><custom:write name="orginfo" property="orgcode" nbsp="true"/></td>
         
            <td class="td-text" width="15%" ><%= label.getLabelName("L_YiLingCode") + label.getLabelName("L_Colon") %></td>
            <td width="35%">           
              <custom:text name="orginfo" property="referenceorgcode" readonly="true" style="border:0;width:100%"  size="20"/>          
            </td>
          </tr>
          <tr>
            <td class="td-text" ><%= label.getLabelName("L_ERPCode") + label.getLabelName("L_Colon") %></td>
            <td><custom:text name="orginfo" property="zyl_erpcode" size="20" onchange="page_checkNullStr(this)"/></td>
            <td class="td-text" id="headParent" ><%= label.getLabelName("L_ParentOrgShortName") + label.getLabelName("L_Colon") %></td>
            <td>
           	  <%if((strDisplayFlag).equals("view")){%>
           	    <custom:text property="parentorgcode" name="orginfo" size="10"></custom:text>
                <custom:text property="parentorgname" name="orginfo" size="20"></custom:text>
              <%}else{ %>
                <custom:text property="parentorgcode" name="orginfo" label="L_ParentOrgShortName" readonly="true" size="10"></custom:text>
                <a onclick="popup('<%=contextPath %>/masterdata/ogm/OrgSelect.jsp?<%= OvalTools.randomURL() %>&globalpccode=112','newwindow','height=250, width=600,top=100,left=100,toolbar=n0, menubar=no, scrollbars=yes, resizable=no, location=no, status=no')"><custom:button  type="3" label="L_Asterisk" imgsrc="flash.gif" border="0"/></a>
                <custom:text property="parentorgname" name="orginfo" readonly="true" size="20"></custom:text>
              <%} %>
              <custom:hidden property="parentorgid" name="orginfo"></custom:hidden>
            </td>
          </tr>
          <tr>
            <td class="need" ><%= label.getLabelName("L_DealerName") + label.getLabelName("L_Colon") %></td>
            <td>
              <%// String s01 = message.getMessageDesc("VALUE_NOT_NULL", label.getLabelName("L_OrgName",false)); %>
	          <%//if(request.getParameter("fromURL") != null){%>
	          <%//}else{%>
              <custom:text name="orginfo" property="orgname" size="42"  label="L_DealerName" command="notnull" onchange="page_checkNullStr(this)"/>
              <%//}%>
            </td>
            <td class="td-text" ><%= label.getLabelName("L_OrgShortName") + label.getLabelName("L_Colon") %></td>
            <td >
              <%// String s02 = message.getMessageDesc("VALUE_NOT_NULL", label.getLabelName("L_ShortName",false)); %>
	          <%//if(request.getParameter("fromURL") != null){%>
              <%//}else{%>
              <custom:text name="orginfo" property="shortname" size="20" onchange="page_checkNullStr(this)"/>
              <%//}%>
            </td>
          </tr>
          <tr>
            <td class="need"><%= label.getLabelName("L_GlobalPCName") + label.getLabelName("L_Colon") %></td>
            <td >
              <custom:selectdic name="orginfo" property="globalpccode" dictType="GlobalPCCode" valueCriteria="112" disabled = "true" command="notnull" defaultValueCost = " " />
            </td>
             
             <td class="td-text"><%= label.getLabelName("L_OrgGrade") + label.getLabelName("L_Colon") %></td>
            <td >
              <custom:selectdic name="orginfo" property="dtlevel" dictType="DealersGrade" valueCriteria="1,2,3,4" defaultValue="-----------"  defaultValueCost = " " label="L_OrgGrade"/>
            </td>
          </tr>
          <tr>
            <td class="need"><%= label.getLabelName("L_DealersLevel") + label.getLabelName("L_Colon") %></td>
            <%--<td >
          	<td class="need"><%= label.getLabelName("L_DealersLevel") + label.getLabelName("L_Colon") %></td>
              <custom:selectdic name="orginfo" property="dtlevel1" dictType="DealersLevel" defaultValue="-----------" defaultValueCost = " " command="notnull" label="L_DealersLevel" onchange="checkDtlevel1()"/>
            </td>--%>
            <td>
              <%if((strDisplayFlag).equals("view")){%>
                <a onclick="getorgpdgroup()" style="text-decoration: none;font-size: 12px;border:1px #FCAD20 solid;background:#ECE9D8;">*</a>
	          <%}else{ %>
                <custom:button type="3" label="L_Ln" value="*" border="0" onclick="getorgpdgroup()"/>
	          <%} %>
            </td>
          	<td class="td-text" id="dtlevel1tempid"><%= label.getLabelName("L_YesOrNoChain")+label.getLabelName("L_Colon") %></td>
            <td>
              <custom:selectdic name="orginfo" property="ischain" onchange="ishead(this.value);" dictType="YesOrNo" defaultValue="-------" defaultValueCost = " " />
            </td>
          </tr>
          <tr id="ishead1" style="display: none;">
          	<td class="need"><%= label.getLabelName("L_Attribute") + label.getLabelName("L_Colon") %></td>
			<td>
				<custom:selectdic dictType="ChainHeadquarterType" name="orginfo" property="orgproperty" defaultValue="-----" defaultValueCost=" " />
			</td>
			<td class="td-text"><%= label.getLabelName("L_Responsibility") + label.getLabelName("L_Colon") %></td>
			<td><custom:text property="manager" name="orginfo" size="20"/></td>
          </tr>
          
          <tr id="ishead2" style="display: none;">
          	<td class="td-text"><%= label.getLabelName("L_Franchiseno") + label.getLabelName("L_Colon") %></td>
          	<td><custom:text property="franchiseno" name="orginfo" size="20" dataType="integer" command="notnegative" label="L_Franchiseno" /></td>
			<td class="td-text"><%= label.getLabelName("L_Totalpharmacy") + label.getLabelName("L_Colon") %></td>
			<td><custom:text property="totalpharmacy" name="orginfo" dataType="integer" size="20" command="notnegative" label="L_Totalpharmacy" /></td>
          </tr>
          <tr>          	
            <td class="need"><%= label.getLabelName("L_PuYaoBusinessLevel") + label.getLabelName("L_Colon") %></td>
            <%--<td>
              <custom:selectdic name="orginfo" property="druglevel" command="notnull" label="L_PuYaoBusinessLevel" dictType="PuYaoBusinessLevel" defaultValue="--------------" defaultValueCost = " " />
            </td>--%>
            <td>             
	          <%if((strDisplayFlag).equals("view")){%>
	            <a onclick="getorgpdgroup1()" style="text-decoration: none;font-size: 12px;border:1px #FCAD20 solid;background:#ECE9D8;">*</a>
	          <%}else{ %>
                <custom:button type="3" label="L_Ln" value="*" border="0" onclick="getorgpdgroup1()"/>
	          <%} %>
            </td>
          	<td class="td-text"><%= label.getLabelName("L_PuYaoSalesModel") + label.getLabelName("L_Colon") %></td>
          	<td>
          		<custom:selectdic name="orginfo" property="salesmodel" dictType="ZylPuYaoSalesModel" defaultValue="--------------" defaultValueCost = " " />
          	</td>
          </tr>
          <tr>          	
            <td class="td-text"><%= label.getLabelName("L_CountyArea") + label.getLabelName("L_Customer") + label.getLabelName("L_Colon") %></td>
            <td>
              <%if((strDisplayFlag).equals("view")){%>
            	<custom:text property="countyorgcode" name="orginfo" size="10"></custom:text>
            	<custom:text property="countyorgname" name="orginfo" size="10"></custom:text>
              <%}else{ %>
            	<custom:text property="countyorgcode" name="orginfo" readonly="true" size="10"></custom:text>&nbsp;
                <a onclick="popup('<%=contextPath %>/masterdata/ogm/OrgSelect.jsp?<%= OvalTools.randomURL() %>&globalpccode=116&flag=pchannel','newwindow','height=250, width=600,top=100,left=100,toolbar=n0, menubar=no, scrollbars=yes, resizable=no, location=no, status=no')"><custom:button  type="3" label="L_Asterisk" imgsrc="flash.gif" border="0"/></a>
            	<custom:text property="countyorgname" name="orginfo" readonly="true" size="10"></custom:text>
              <%} %>
              <custom:hidden property="countyorgid" name="orginfo"/>
			</td>
          	<td class="td-text"><%= label.getLabelName("L_KeyBusiness") + label.getLabelName("L_Colon") %></td>
          	<td>
          	  <custom:selectdic name="orginfo" dictType="YesOrNo" property="emphasisbusiness" defaultValue="------" defaultValueCost = " " />
          	</td>
          </tr>
          
             <tr>          	 
          	<td class="td-text"><%= label.getLabelName("L_CommercialSalesType") + label.getLabelName("L_Colon") %></td>
          	<td>
          		<custom:selectdic name="orginfo" property="commercialsales" dictType="CommercialSalesType" defaultValue="--------------" defaultValueCost = " " />
          	</td>
	        <td class="td-text"><%= label.getLabelName("L_PatentMedicineProtocolType") + label.getLabelName("L_Colon") %></td>
	        <td > 
	          <custom:selectdic name="orginfo" property="patentmedicineprotocol" dictType="PatentMedicineProtocolType" defaultValue="--------------" defaultValueCost = " " />
	        </td>
          </tr>
          
            <tr>          	 
          	<td class="td-text"><%= label.getLabelName("L_Genericprotocoltype") + label.getLabelName("L_Colon") %></td>
          	<td>
          		<custom:selectdic name="orginfo" property="genericprotocol" dictType="Genericprotocoltype" defaultValue="--------------" defaultValueCost = " " />
          	</td>
	        <td class="td-text"><%= label.getLabelName("L_IsBindingogenericdrugs") + label.getLabelName("L_Colon") %></td>
	        <td > 
	          <custom:selectdic name="orginfo" property="isbindingogenericdrugs" dictType="YesOrNo" defaultValue="--------------" defaultValueCost = " " />
	        </td>
          </tr>
          
          
          <tr>          	 
          	<td class="td-text"><%= label.getLabelName("L_BaseDrugBuInfo") + label.getLabelName("L_Colon") %></td>
          	<td>
          		<custom:selectdic name="orginfo" property="delivery" dictType="ZylBaseDrugBuInfo" defaultValue="--------------" defaultValueCost = " " />
          	</td>
	        <td class="need"><%= label.getLabelName("L_CountryName") + label.getLabelName("L_Colon") %></td>
	        <td > 
	          <custom:select style="width:100" optionsName="allcountry" optionValueKey="countrycode" optionInnerTextKey="countryname" name="orginfo" property="countrycode" command="notnull"/>
	        </td>
          </tr>
          
          <tr>
            <td class="td-text"><%= label.getLabelName("L_AccountInfo1") + label.getLabelName("L_Colon") %></td>
	        <td><custom:selectdic name="orginfo" dictType="AccountconditionType" property="isopenaccount" defaultValue="------" valueCriteria="1,2"  defaultValueCost=" "/></td> 
            <td class="need"><%= label.getLabelName("L_Province") + label.getLabelName("L_Colon") %></td>
            <td> 
            <%if((strDisplayFlag).equals("view")){%>
              <custom:text property="regioncode" name="orginfo" size="10" />
              <custom:text property="regionname" name="orginfo" size="20"/>
            <%}else{ %>
              <custom:text property="regioncode" name="orginfo" command="notnull" label="L_Province" size="10" readonly="true"/>
              <a onclick="javascript:page_selectProvince();"><custom:button type="3" label="L_Asterisk" imgsrc="flash.gif" border="0"/></a>
              <custom:text property="regionname" name="orginfo" readonly="true" size="20"/>
            <%} %>
            </td>
          </tr>
          <tr> 
            <td class="td-text"><%= label.getLabelName("L_URL") + label.getLabelName("L_Colon") %></td>
            <td > 
               <custom:text name="orginfo" property="url" size="20" />
            </td>
          	<td class="need"><%= label.getLabelName("L_City") + label.getLabelName("L_Colon") %></td>
          	<td>
          		<%if((strDisplayFlag).equals("view")){%>
          		<custom:text property="citycode" name="orginfo" size="10"/>
            	<custom:text property="cityname" name="orginfo" size="20"/>
            	<%}else{ %>
            	<custom:text property="citycode" name="orginfo" command="notnull" label="L_City" size="10" readonly="true"/>
            	<a onclick="javascript:page_selectCity('city',1);"><custom:button type="3" label="L_Asterisk" imgsrc="flash.gif" border="0"/></a>
            	<custom:text property="cityname" name="orginfo" readonly="true" size="20"/>
            	<%} %>
            </td>             
          </tr>
          <tr>
            <td class="td-text"><%= label.getLabelName("L_Email") + label.getLabelName("L_Colon") %></td>
            <td > 
               <custom:text name="orginfo" property="email" size="20"/>
            </td>
            <td class="need"><%= label.getLabelName("L_YLCounty") + label.getLabelName("L_Colon") %></td>
            <td>
            	<%if((strDisplayFlag).equals("view")){%>
            	<custom:text property="countycode" name="orginfo" size="10"/>
              	<custom:text property="countyname" name="orginfo" size="20"/>
              	<%}else{ %>
              	<custom:text property="countycode" name="orginfo" size="10" readonly="true" command="notnull" label="L_YLCounty"/>
              	<a onclick="javascript:page_selectCity('county',2);"><custom:button type="3" label="L_Asterisk" imgsrc="flash.gif" border="0"/></a>
              	<custom:text property="countyname" name="orginfo" readonly="true" size="20"/>
              	<%} %>
            </td>
          </tr>
          <tr>
          	 <td class="td-text"><%= label.getLabelName("L_Telephone") + label.getLabelName("L_Colon") %></td>
            <td > 
            	<% String s0 = message.getMessageDesc("VALUE_NOT_NULL", label.getLabelName("L_Telephone",false)); %>
               <custom:text name="orginfo" property="telephone" size="20"  label="<%=   s0 %>"/>
            </td>
            <td class="td-text"><%= label.getLabelName("L_Fax") + label.getLabelName("L_Colon") %></td>
            <td > 
               <custom:text name="orginfo" property="fax" size="20" />
            </td>
          </tr>
          <tr>
          	 <td class="td-text"><%= label.getLabelName("L_ZipCode") + label.getLabelName("L_Colon") %></td>
            <td > 
               <custom:text name="orginfo" property="zipcode" size="20" label="L_ZipCode" />
            </td>
          	<td class="need"><%= label.getLabelName("L_StatusName") + label.getLabelName("L_Colon") %></td>
            <td >
           <%if(request.getParameter("fromURL") != null){%>
            <custom:select style="width:100" optionsName="allstatus" optionValueKey="statuscode"  optionInnerTextKey="statusname" name="orginfo" property="status"/>
           <%} else {%>
             <custom:select style="width:100" optionsName="allstatus" optionValueKey="statuscode"  optionInnerTextKey="statusname" name="orginfo" property="status"/>
           <%}%>
          	</td>
          </tr>
          <tr>
          <%-- 
           <td class="td-text"><%= label.getLabelName("L_KeyPersonnelArchives") + label.getLabelName("L_Colon") %></td>
	          <td>
		          <custom:text name="orginfo" property="email" size="20"/>
		          <a onclick="popup('<%=contextPath %>/zyl/masterdata/ogm/DTKeyPerson.jsp?<%= OvalTools.randomURL() %>','newwindow','height=250, width=600,top=100,left=100,toolbar=n0, menubar=no, scrollbars=yes, resizable=no, location=no, status=yes')">
		          <custom:button type="3" label="L_Asterisk" imgsrc="flash.gif" border="0"/>
		          </a>
	          </td>
           --%>
	         
	          <td class="td-text"><%= label.getLabelName("L_DeliveryRange") + label.getLabelName("L_Colon") %></td>
	          <td><custom:text name="orginfo" property="deliveryscope" size="20"/></td>
	          
	           <td class="td-text"><%= label.getLabelName("L_BaseMedicineDelivery") + label.getLabelName("L_Colon") %></td>
	          <td>
	          	<custom:selectdic name="orginfo" dictType="YesOrNo" property="deliveryessentialdrug" defaultValue="------" defaultValueCost = " " />
	          </td>
          </tr>
          <tr>
	         
	          <td class="td-text"><%= label.getLabelName("L_CustodyHospitalNumber") + label.getLabelName("L_Colon") %></td>
	          <td><custom:text name="orginfo" property="hospitaltrusteeship" size="20" command="notnegative" dataType="integer" label="L_CustodyHospitalNumber"/></td>
              <td class="td-text"><%= label.getLabelName("L_LootedProductsSituation") + label.getLabelName("L_Colon") %></td>
	          <td><custom:text name="orginfo" property="crossregionsale" size="20"/></td>
        
          </tr>
          <tr>
	         
	          <%--<td class="td-text"><%= label.getLabelName("L_YesOrNoChain") + label.getLabelName("L_Colon") %></td>
	          <td><custom:selectdic name="orginfo" dictType="YesOrNo" property="ischain" defaultValue="------" defaultValueCost=" "/></td>--%>
              <td class="td-text"><%= label.getLabelName("L_Scale") + label.getLabelName("L_Colon") %></td>
	          <td><custom:text name="orginfo" property="scale" size="20"/></td>
	          <td class="need"><%= label.getLabelName("L_Biznature") + label.getLabelName("L_Colon") %></td>
	          <td><custom:selectdic name="orginfo" dictType="Biznature" command="notnull" label="L_Biznature" property="businessproperty" defaultValue="------" defaultValueCost=" "/></td>
          </tr>
	         
	        
             
       <%-- <td class="need"><%= label.getLabelName("L_BusinessAreaName") + label.getLabelName("L_Colon") %></td>
             <td>
				<custom:hidden name="orginfo" property="businessareaid"/>
				<%if((strDisplayFlag).equals("view")){%>
				<custom:write name="orginfo" property="areaname" nbsp="true"/>
				<%}else{%>
				<custom:text name="orginfo" property="areaname" command="notnull" label="L_BusinessAreaName" readonly="true"/>
				<%}%>
				<a onclick="popBusinessarea()"><custom:button type="3" value="*"/></a>
            </td>
            
            --%>
          
          <tr>
           	<td class="td-text"><%= label.getLabelName("L_Address") + label.getLabelName("L_Colon") %></td>
            <td colspan="3">
               <custom:text name="orginfo" property="address" size="100"/>
            </td>
           </tr>
          
           
           <tr>
            <td class="td-text"><%= label.getLabelName("L_Comments") + label.getLabelName("L_Colon") %></td>
            <td colspan="3"> 
               <custom:text name="orginfo" property="comments" size="100"/>
            </td>
           </tr>
           </table>
           <div id="showbutton" style="display:block">
		  <table border="1" cellspacing="0" bordercolorlight="#999999" bordercolordark="#FFFFFF" align="center" width="100%" cellpadding="1">
			  <tr>
				<td height="49" class="td_right">
					<a onclick="page_showExtendInfo()"><input type=button class="button2" value="<%= label.getLabelName("L_ExtendedInformationDisplay") %>" style="width:100"></a>
				</td>
			  </tr>
		  </table>
		  </div>
		 <div id="hiddenbutton" style="display:none">
		  <table border="1" cellspacing="0" bordercolorlight="#999999" bordercolordark="#FFFFFF" align="center" width="100%" cellpadding="1">
			  <tr>
				<td height="49" class="td_right">
					<a onclick="page_hiddenExtendInfo()"><input type=button class="button2" value="<%= label.getLabelName("L_HiddenExtensionInformation") %>" style="width:100"></a>
				</td>
			  </tr>
		  </table>
		  </div>
		
		  <div id="extendinfo" style="display:none">
		  	<table border="1" cellspacing="0" bordercolorlight="#999999" bordercolordark="#FFFFFF" align="center" width="100%" cellpadding="1">
               <!-- <input type="hidden" name="languagecode" value="<%= strLanguageCode %>"> -->
          
          <tr> 
            <td colspan="4" class="deepblue-left"><img src="<%=contextPath %>/images/<%= strLanguageCode %>/quote.gif"> 
              <%= label.getLabelName("L_CooperativeIntentions") + label.getLabelName("L_Colon") %></td>
          </tr>
          <tr>
          	<td class="td-text" width="20%"><%= label.getLabelName("L_AgreementQuota") + label.getLabelName("L_Colon") %></td>
          	<td width="30%"><custom:text name="orginfo" property="protocolquota" size="20"/></td>
          	<td class="td-text" width="20%"><%= label.getLabelName("L_CreditLimit") + label.getLabelName("L_Colon") %></td>
          	<td width="30%"><custom:text name="orginfo" property="trustquota" size="20"/></td>
          </tr>
          <tr> 
            <td colspan="4" class="deepblue-left"><img src="<%=contextPath %>/images/<%= strLanguageCode %>/quote.gif"> 
             <%= label.getLabelName("L_CommercialProperties") + label.getLabelName("L_Colon") %></td>
          </tr>
          <tr>
          	<td class="td-text"><%= label.getLabelName("L_PurePinProportion") + label.getLabelName("L_Colon") %></td>
          	<td><custom:text name="orginfo" property="salespercent"  onblur="page_ck(salespercent);" size="20"/></td>
          	<td class="td-text"><%= label.getLabelName("L_AllocateProportion") + label.getLabelName("L_Colon") %></td>
          	<td><custom:text name="orginfo" property="transferpercent" onblur="page_ck(transferpercent);" size="20"/></td>
          </tr>
          <tr>
          	<td class="td-text"><%= label.getLabelName("L_DistributionProportion") + label.getLabelName("L_Colon") %></td>
          	<td><custom:text name="orginfo" property="distributepercent" onblur="page_ck(distributepercent);" size="20"/></td>
          	<td class="td-text"><%= label.getLabelName("L_nature") + label.getLabelName("L_Colon") %></td>
          	<td>
          		<custom:selectdic name="orginfo" property="biztype" dictType="BizType" defaultValue="-----------" defaultValueCost = " "/>
          	</td>
          </tr>
          <tr> 
            <td colspan="4" class="deepblue-left"><img src="<%=contextPath %>/images/<%= strLanguageCode %>/quote.gif"> 
              <%= label.getLabelName("L_CompaniesCoverage") + label.getLabelName("L_Colon") %></td>
          </tr>
          <tr>
          	<td class="td-text"><%= label.getLabelName("L_Hospital") + label.getLabelName("L_Colon") %></td>
          	<td><custom:text name="orginfo" property="bizcoverhospital" size="20" command="notnegative" dataType="integer" onblur="page_doSum(bizcoverhospital);" label="L_Hospital"/></td>
          	<td class="td-text"><%= label.getLabelName("L_Pharmacy") + label.getLabelName("L_Colon") %></td>
          	<td><custom:text name="orginfo" property="bizcoverpharmacy" size="20" command="notnegative" dataType="integer" onblur="page_doSum(bizcoverpharmacy);" label="L_Pharmacy"/></td>
          </tr>
          <tr>
          	<td class="td-text"><%= label.getLabelName("L_ThirdTerminal") + label.getLabelName("L_Colon") %></td>
          	<td><custom:text name="orginfo" property="bizcoverthirdterminal" size="20" command="notnegative" dataType="integer" onblur="page_doSum(bizcoverthirdterminal);" label="L_ThirdTerminal"/></td>
          	<td class="td-text"><%= label.getLabelName("L_Commercial") + label.getLabelName("L_Colon") %></td>
          	<td><custom:text name="orginfo" property="bizcovercorp" size="20" command="notnegative" dataType="integer" onblur="page_doSum(bizcovercorp);" label="L_Commercial"/></td>
          </tr>
          <tr>
          	<td class="td-text"><%= label.getLabelName("L_Sum") + label.getLabelName("L_Colon") %></td>
          	<td><custom:text name="orginfo" property="bizcovertotal" size="20" command="notnegative" dataType="number" label="L_Sum"/></td>
          	<td class="td-text">&nbsp;</td>
          	<td>&nbsp;</td>
          </tr>
          <tr> 
            <td colspan="4" class="deepblue-left"><img src="<%=contextPath %>/images/<%= strLanguageCode %>/quote.gif"> 
             <%= label.getLabelName("L_FirstDealersReceiveInfo") + label.getLabelName("L_Colon") %></td>
          </tr>
          <tr>
          	<td class="td-text"><%= label.getLabelName("L_ReceiptMan") + label.getLabelName("L_Colon") %></td>
          	<td><custom:text name="orginfo" property="consigner" size="20" /></td>
          	<td class="td-text"><%= label.getLabelName("L_RecieverAddress") + label.getLabelName("L_Colon") %></td>
          	<td><custom:text name="orginfo" property="consigneraddr" size="20" /></td>
          </tr>
          <tr>
          	<td class="td-text"><%= label.getLabelName("L_Consignerphone") + label.getLabelName("L_Colon") %></td>
          	<td><custom:text name="orginfo" property="consignerphone" size="20" /></td>
          	<td class="td-text">&nbsp;</td>
          	<td>&nbsp;</td>
          </tr>
          <tr> 
            <td colspan="4" class="deepblue-left"><img src="<%=contextPath %>/images/<%= strLanguageCode %>/quote.gif"> 
              <%= label.getLabelName("L_OrgRegistrationInfo") + label.getLabelName("L_Colon") %></td>
          </tr>
          <tr>
          <td class="td-text"><%= label.getLabelName("L_registername") + label.getLabelName("L_Colon") %></td>
          <td><custom:text name="orginfo" property="registername" size="20" /></td>
          <td class="td-text"><%= label.getLabelName("L_CorporatePerson") + label.getLabelName("L_Colon") %></td>
            <td > 
            	<% String s4 = message.getMessageDesc("VALUE_NOT_NULL", label.getLabelName("L_CorporatePerson",false)); %>
               <custom:text name="orginfo" property="corporateperson" size="20"  label="<%=   s4 %>"/>
            </td>
          </tr>
          <tr> 
          	<td class="td-text"><%= label.getLabelName("L_CompanyProperty") + label.getLabelName("L_Colon") %></td>
            <td > 
             <custom:text name="orginfo" property="corptype" size="20" />
            </td>
            <td class="td-text"><%= label.getLabelName("L_RegisterDate") + label.getLabelName("L_Colon") %></td>
            <td >
            <%if((strDisplayFlag).equals("view")){%>             
         <custom:write property="opendate" name="orginfo" nbsp="true"/>
        	<%}else{ %>
        	
        	    <custom:text property="opendate" name="orginfo" dataType="date" dataFormatName="dateformat" label="L_OrgOpenDate" size="20"  onfocus="c.show(this,'frm.opendate','yyyy-MM-dd')"/>
        	<%} %>
            </td>
          </tr>
          <tr> 
            
            <td class="td-text"><%= label.getLabelName("L_RegisterFund") + label.getLabelName("L_Colon") %></td>
            <td > 
            	<% String s5 = message.getMessageDesc("VALUE_NOT_NULL", label.getLabelName("L_RegisterFund",false)); %>
            	<% String af = (String)session.getAttribute("amountformat"); %>
               <custom:text name="orginfo" property="registerfund" size="20" dataFormat="<%= af %>" dataType="number" label="L_RegisterFund"/>
            </td>
            <td class="td-text"><%= label.getLabelName("L_BusinessLicenseNo") + label.getLabelName("L_Colon") %></td>
            <td > 
               <custom:text name="orginfo" property="licenceno" size="20" />
            </td>
          </tr>
          <tr> 
            
            <td class="td-text"><%= label.getLabelName("L_BankName") + label.getLabelName("L_Colon") %></td>
            <td > 
               <custom:text name="orginfo" property="accountbank" size="20" />
            </td>
            <td class="td-text"><%= label.getLabelName("L_BankAccount") + label.getLabelName("L_Colon") %></td>
            <td > 
               <custom:text name="orginfo" property="accountno" size="20" />
            </td>
          </tr>  
          <tr>
          	<td class="td-text"><%= label.getLabelName("L_VATRegistrationNumber") + label.getLabelName("L_Colon") %></td>
            <td > 
               <custom:text name="orginfo" property="taxno" size="20" />
            </td>
            <td class="td-text"><%= label.getLabelName("L_taxno1") + label.getLabelName("L_Colon") %></td>
			  <td><custom:text name="orginfo" property="taxno1" size="20"/></td>
            </tr>
            <tr>
              <td class="td-text"><%= label.getLabelName("L_GSPCertificateNO") + label.getLabelName("L_Colon") %></td>
	       	  <td><custom:text name="orginfo" property="gspcertificationno" size="20"/></td>
	          <td class="td-text"><%= label.getLabelName("L_GSPCertificateValidity") + label.getLabelName("L_Colon") %></td>
	          <td>
	          	<%if((strDisplayFlag).equals("view")){%>
				
				   <custom:write property="gspvaliditydate" name="orginfo"  nbsp="true"/>
			  	
			  	<%}else{ %>
				
			 <custom:text property="gspvaliditydate" name="orginfo" dataType="date" readonly="true" dataFormatName="dateformat" label="L_GSPCertificateValidity" size="20"  onfocus="c.show(this,'frm.gspvaliditydate','yyyy-MM-dd')"/>
			  	<% }%>
			  </td>
          </tr>
          <tr>
           	<td class="td-text"><%= label.getLabelName("L_RegisteredAddress") + label.getLabelName("L_Colon") %></td>
            <td colspan="3">
               <custom:text name="orginfo" property="registeraddress" size="100"/>
            </td>
           </tr>
           </table>
           </div>
  <tr>
    <td class="summary_top"></td>
  </tr>
  </form>   
</table>
<table width="100%" cellspacing="0" cellpadding="0">
	<tr>
		<td class="td_center">
		<a onclick="__back()"><custom:button type="2" label="L_Back" imgsrc="delete.gif" border="0" style="width:60"/></a>
		</td>
	</tr>
</table>
<script>
  checkNumber(document.frm);
  var list=document.getElementsByTagName("input");
  m=list.length
  list[m-1].style.display='none';
</script>
</body>
</html>



